{% extends "admin/base_site.html" %}
{% load i18n %}
{% block content %}
<div id="content-main">

{% if search %}
    <p>
    Search results for:<br />
    Last name: {{ last }}<br />
    Zip: {{ zip }}<br />
    </p>
{% endif %}

{% if attendees %}
    <table border="1">
    <tr>
        <th>Registration Number</th>
        <th>Name</th>
        <th>Type</th>
        <th>Status</th>
        {% if person.checked_in %}
        <th>Reprint</th>
        {% endif %}
    </tr>
    {% for person in attendees %}
        <tr>
        <td>{{ person.id }}</td>
        <td>{{ person.first_name }} {{ person.last_name }}</td>
        <td>{{ person.badge_type.description }}</td>
        <td>
        {% if person.checked_in %}
        Already Checked In
        {% else %}
        <form method="post" action="../finish_checkin/">
        <input type="hidden" name="id" value="{{ person.id }}">
        <input type="submit" value="Check In">
        </form>
        {% endif %}
        </td>
        {% if person.checked_in %}
        <td>
        <form method="post" action="../reprint/">
        <input type="hidden" name="id" value="{{ person.id }}">
        <input type="submit" value="Reprint {{ person.rp_count }}">
        </form>
        </td>
        {% endif %}
        </tr>
    {% endfor %}
    </table>
{% endif %}

{% if search %}
    <hr />
{% endif %}

<p>
Please type in the following information:
</p>

<p>
<form method="post" action=".">
<table>
<tr>
    <td>Last Name</td>
    <td><input type="text" name="last_name" maxlength="60" size="40"
      value="{{ last }}" /></td>
</tr>
<tr>
    <td>Zip Code</td>
    <td><input type="text" name="zip" maxlength="10" size="10"
      value="{{ zip }}" /></td>
</tr>
</table>
<input type="submit"
{% if search %}
value="Search Again"
{% else %}
value="Search"
{% endif %}
/>
</form>
</p>
</div>
{% endblock %}

